#ifndef SC_ARC_H
#define SC_ARC_H

#include "sc_gui.h"

typedef struct
{
    int16_t  cx;
    int16_t  cy;
    int16_t  r;
    int16_t  ir;
    uint8_t  s;
}SC_arc;


int16_t sc_sin(int16_t angle);

int16_t sc_cos(int16_t angle);

uint8_t sc_sqrt(uint32_t num);

void SC_pfb_RoundFrame(SC_tile *dest,int xs,int ys,int xe,int ye, int r,int ir, uint16_t ac,uint16_t bc);

void SC_pfb_DrawArc(SC_tile *dest,SC_arc *p,int startAngle, int endAngle,uint16_t ac,uint16_t bc);

void SC_pfb_RoundBar(SC_tile *dest,int xs,int ys,int w,int h,int r,int ir,uint16_t ac,uint16_t bc,int vol,int max);


void SC_DrawLine_AA(int x1, int y1, int x2, int y2,uint16_t colour);

//SDF快速反锯齿画线
#define DRAW_LINE_SDF_EN  0
void SC_DrawLine_SDF(float ax, float ay, float bx, float by, float r,u16 fc);

#endif

